<?php

namespace Home\Controller;

class ShareController extends BaseController
{
    public function commonJs(){
        $the_config = array(
            'lang'          => 'zh_CN',
            'is_root'       => 0,
            'web_root'      => '/',
            'web_host'      => 'http://www.mtblog.com/',
            'static_path'   => C('STATIC_PATH'),
            'basic_path'    => ROOT_PATH,
            'version'       => C('KOD_VERSION'),
            'app_host'      => ROOT_PATH,
            'office_server' => C('OFFICE_SERVER'),
            'json_data'     => "",
            'share_page'    => 'share',

            'theme'         => 'simple/',           //列表排序依照的字段
            'list_type'     => 'icon',       //列表排序依照的字段
            'sort_field'    => 'name', //列表排序依照的字段
            'sort_order'    => 'up', //列表排序升序or降序
            'musictheme'    => 'mp3player',
            'movietheme'    => 'webplayer'
        );

        $js  = 'LNG='.json_encode(L()).';';
        $js .= 'AUTH=[];';
        $js .= 'G='.json_encode($the_config).';';
        header("Content-Type:application/javascript");
        echo $js;
    }
}